package service.impl;

import dao.UsersDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Users;
import service.UsersService;
import util.CommonResult;

@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersDao usersDao;
    @Override
    public CommonResult userLogin(String userName, String password) {
        Users users = usersDao.userLogin(userName, password);
        if(users!=null){
            return new CommonResult(users);
        }
        return new CommonResult("登陆失败");
    }
}
